home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 4
/
Apprentice-Release4.iso
/
Languages
/
MacMETH 3.2.3
/
MacMETH Manual 1992
/
HierSRC.DOC
next >
Wrap
Text File
|
1995-12-13
|
4KB
|
95 lines
HierSRC 1.01 - Modula-2 Dependency Analyzer/jth June 93/af Nov 95
This tool analyses recursively all direct or indirect imports of a Modula-2
module. It produces a dependency matrix of all modules involved and which
are available in source form.
Usage
-----
This tool first prompts you for the name of the file which holds
the module you wish to analyze. Additionally you may add optional
arguments specifying how to perform the analysis. Your input must be typed
according to the following syntax given in EBNF (Extended Backus Naur
Formalism):
input ::= inputFile [ "/" option { option } ].
inputFile ::= moduleIdent "." ( "MOD" | "DEF" ).
option ::= "-" exclude | "+" combine.
exclude ::= string.
combine ::= string.
string ::= char { char }.
Note the strings 'exclude' respectively 'combine' specify a group of modules.
For instance if you wish to ignore all modules from the analysis, which have a
name which starts with 'DM', enter as the 'exclude' string 'DM'. For
instance enter the following to ignore all modules of the 'Dialog Machine':
...> MyModule.MOD/-DM
Note, any module which may be imported by such a module, e.g. if DMFiles
imports from module FileSystem, that the latter will also be excluded from
the analysis, unless there is another module involved which also imports
from FileSystem.
Alternatively, by entering a 'combine' string, you can specify a group of
modules to appear only as a single, sort of "Super"-module. For instance
if you wish to combine all 'Dialog Machine' modules together in a single
entry in the output matrix, you can enter the combine string 'DM' as shown
in this example:
...> MyModule.DEF/+DM
Again, only the beginning of the module's names will be recognized. Finally
an example where several options are specified:
...> MyModule.MOD/+DM+Mat-ML
Above example will combine all modules whose names start with 'DM' or 'Mat'
into a super-module 'DMLib' respectively 'MatLib', and will ignore any
module starting with 'ML' from the analysis. Hope this helps.
Remark/Method
-------------
The tool scans recursively the import list of the input-file. Traversal
stops at each branch if either no more modules are imported, or if a module
can't be found. Files are found according to the paths specified in the
User.Profile (see Wirth et al., 1992).
Note, this tool can also handle circular import structures. The latter can
easily be detected, since circular imports will break the triangle shape of
one of the output matrices. This tool tries always to sort the arrangement
of the modules in one of the output matrix such that a triangle matrix
results (of course only possible, if no circular imports are present).
Note, combining modules may lead to spurious, circular import structures,
which are in fact not really circular but are only caused by the
amalgamation of actually separate modules.
The dependency matrix is written to a file consisting of the moduleIdent
and with the extension "DEP", e.g. "MyModule.DEP". Unless modules are
combined, each row respectively column of the output matrices corresponds
to a single module. The matrix' elements are either empty or marked with
an "X". An "X" at the position [c,r] means that the module in column c
imports the module in the row r.
The matrix elements are separated by TAB (ASCII 9) characters. Rows are
terminated with a EOL. Note, this supports the viewing of the dependency
matrix within a spread-sheet program.
References
----------
This tool is available via anonymous ftp from Internet host
"baikal.ethz.ch" (Internet address 129.132.80.130). For further
information you may also wish to visit
http://www.ito.umnw.ethz.ch/sysecol
Wirth, N., Gutknecht, J., Heiz, W., Schär, H., Seiler, H., Vetterli, C. &
Fischlin, A., 1992. MacMETH. A fast Modula-2 language system for the
Apple Macintosh. User Manual. 4th, completely revised ed. Department of
Computer Sciences (ETH), Zürich, Switzerland, 116 pp.
af 15/Nov/95